

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>pyamp.config.parser &mdash; pyamp v1.2 documentation</title>
    <link rel="stylesheet" href="../../../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../../',
        VERSION:     '1.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../../_static/doctools.js"></script>
    <link rel="top" title="pyamp v1.2 documentation" href="../../../index.html" />
    <link rel="up" title="pyamp.config" href="../config.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li><a href="../../../index.html">pyamp v1.2 documentation</a> &raquo;</li>
          <li><a href="../../index.html" >Module code</a> &raquo;</li>
          <li><a href="../config.html" accesskey="U">pyamp.config</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <h1>Source code for pyamp.config.parser</h1><div class="highlight"><pre>
<span class="c"># Copyright 2012 Brett Ponsler</span>
<span class="c"># This file is part of pyamp.</span>
<span class="c">#</span>
<span class="c"># pyamp is free software: you can redistribute it and/or modify</span>
<span class="c"># it under the terms of the GNU General Public License as published by</span>
<span class="c"># the Free Software Foundation, either version 3 of the License, or</span>
<span class="c"># (at your option) any later version.</span>
<span class="c">#</span>
<span class="c"># pyamp is distributed in the hope that it will be useful,</span>
<span class="c"># but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<span class="c"># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<span class="c"># GNU General Public License for more details.</span>
<span class="c">#</span>
<span class="c"># You should have received a copy of the GNU General Public License</span>
<span class="c"># along with pyamp.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<span class="sd">&#39;&#39;&#39;The parser module contains the OptionsParser class which provides the</span>
<span class="sd">ability to parse a configuration file and command line given a set of</span>
<span class="sd">available options.</span>

<span class="sd">.&#39;&#39;&#39;</span>
<span class="kn">from</span> <span class="nn">os.path</span> <span class="kn">import</span> <span class="n">exists</span>
<span class="kn">from</span> <span class="nn">optparse</span> <span class="kn">import</span> <span class="n">OptionParser</span>

<span class="kn">from</span> <span class="nn">pyamp.patterns</span> <span class="kn">import</span> <span class="n">Borg</span>
<span class="kn">from</span> <span class="nn">pyamp.config.configFile</span> <span class="kn">import</span> <span class="n">ConfigFile</span>
<span class="kn">from</span> <span class="nn">pyamp.logging</span> <span class="kn">import</span> <span class="n">Colors</span><span class="p">,</span> <span class="n">Loggable</span>


<span class="n">__all__</span> <span class="o">=</span> <span class="p">[</span><span class="s">&quot;OptionsParser&quot;</span><span class="p">]</span>


<div class="viewcode-block" id="OptionsParser"><a class="viewcode-back" href="../../../_generated/pyamp_config_parser.html#pyamp.config.parser.OptionsParser">[docs]</a><span class="k">class</span> <span class="nc">OptionsParser</span><span class="p">(</span><span class="n">Borg</span><span class="p">,</span> <span class="n">Loggable</span><span class="p">):</span>
    <span class="sd">&#39;&#39;&#39;The OptionsParser class is responsible for parsing command line and</span>
<span class="sd">    configuration file options and providing the ability to get the value of a</span>
<span class="sd">    given option.</span>

<span class="sd">    This class implements the :class:`pyamp.patterns.Borg` design pattern and</span>
<span class="sd">    also implements the :class:`pyamp.logging.Loggable` interface.</span>

<span class="sd">    &#39;&#39;&#39;</span>

    <span class="n">Variables</span> <span class="o">=</span> <span class="p">{}</span>
    <span class="sd">&#39;&#39;&#39;This property contains a dictionary mapping variable names</span>
<span class="sd">    to their respective values. These variables can be used</span>
<span class="sd">    within the configuration file and will be replaced by the</span>
<span class="sd">    assigned values.</span>

<span class="sd">    Variables can be used in the configuration file by appending a dollar sign</span>
<span class="sd">    before the name of the variable. The variable will then replaced with its</span>
<span class="sd">    value prior to parsing the file.</span>

<span class="sd">    Example::</span>

<span class="sd">        # $HOME will be replaced with the user&#39;s home directory before parsing</span>
<span class="sd">        [Section]</span>
<span class="sd">        Var = $HOME</span>

<span class="sd">    &#39;&#39;&#39;</span>

    <span class="n">Options</span> <span class="o">=</span> <span class="p">{}</span>
    <span class="sd">&#39;&#39;&#39;This property contains a dictionary mapping section names to the list of</span>
<span class="sd">    options contained within that section. Options must be a subclass of</span>
<span class="sd">    the :class:`Option` class. These are the sections and options that will</span>
<span class="sd">    be loaded from the configuration file and the command line arguments.</span>

<span class="sd">    .. note:: Any :class:`.ClOption` objects that are given will be</span>
<span class="sd">       configurable via the configuration file and from the command line.</span>

<span class="sd">    &#39;&#39;&#39;</span>

    <span class="n">ClOptions</span> <span class="o">=</span> <span class="p">[]</span>
    <span class="sd">&#39;&#39;&#39;This property contains the list of options that are only configurable</span>
<span class="sd">    via the command line.</span>

<span class="sd">    &#39;&#39;&#39;</span>

<div class="viewcode-block" id="OptionsParser.init"><a class="viewcode-back" href="../../../_generated/pyamp_config_parser.html#pyamp.config.parser.OptionsParser.init">[docs]</a>    <span class="k">def</span> <span class="nf">init</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">logger</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
        <span class="sd">&#39;&#39;&#39;Override the :class:`pyamp.patterns.Borg` init function.</span>

<span class="sd">        * logger -- The :class:`pyamp.logging.Logger` or</span>
<span class="sd">                    :class:`pyamp.logging.LogData` object</span>

<span class="sd">        &#39;&#39;&#39;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="o">=</span> <span class="p">{}</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">clOptions</span> <span class="o">=</span> <span class="p">{}</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">setLogger</span><span class="p">(</span><span class="n">logger</span><span class="p">)</span>

        <span class="c"># Create the command line and configuration file parsers</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">__createCommandLineParser</span><span class="p">()</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">__createConfigParser</span><span class="p">()</span>
</div>
<div class="viewcode-block" id="OptionsParser.setLogger"><a class="viewcode-back" href="../../../_generated/pyamp_config_parser.html#pyamp.config.parser.OptionsParser.setLogger">[docs]</a>    <span class="k">def</span> <span class="nf">setLogger</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">logger</span><span class="p">,</span> <span class="n">color</span><span class="o">=</span><span class="n">Colors</span><span class="o">.</span><span class="n">Foreground</span><span class="o">.</span><span class="n">White</span><span class="p">):</span>
        <span class="sd">&#39;&#39;&#39;Set the logger for the OptionsParser.</span>

<span class="sd">        * logger -- The :class:`pyamp.logging.Logger` or</span>
<span class="sd">                    :class:`pyamp.logging.LogData` object</span>

<span class="sd">        &#39;&#39;&#39;</span>
        <span class="n">Loggable</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">__class__</span><span class="o">.</span><span class="n">__name__</span><span class="p">,</span> <span class="n">logger</span><span class="p">,</span> <span class="n">color</span><span class="p">)</span>
</div>
<div class="viewcode-block" id="OptionsParser.parse"><a class="viewcode-back" href="../../../_generated/pyamp_config_parser.html#pyamp.config.parser.OptionsParser.parse">[docs]</a>    <span class="k">def</span> <span class="nf">parse</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">argv</span><span class="p">,</span> <span class="n">filename</span><span class="p">):</span>
        <span class="sd">&#39;&#39;&#39;Parse the command line options, and the configuration file.</span>

<span class="sd">        * argv -- The command line options</span>
<span class="sd">        * filename -- The path to the configuration file</span>

<span class="sd">        &#39;&#39;&#39;</span>
        <span class="c"># First parse the configuration file</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">__parseFile</span><span class="p">(</span><span class="n">filename</span><span class="p">)</span>

        <span class="c"># Now parse the command line options, which override any</span>
        <span class="c"># overlapping configuration properties</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">__parseCommandLine</span><span class="p">(</span><span class="n">argv</span><span class="p">)</span>

        <span class="c"># Print out all of the settings that are configured for</span>
        <span class="c"># debugging purposes</span>
        <span class="k">for</span> <span class="n">_</span><span class="p">,</span> <span class="n">options</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">iteritems</span><span class="p">():</span>
            <span class="k">for</span> <span class="n">optionName</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">options</span><span class="o">.</span><span class="n">iteritems</span><span class="p">():</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s">&quot;[</span><span class="si">%s</span><span class="s">] = </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">optionName</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">value</span><span class="p">)),</span> <span class="n">level</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span>
</div>
    <span class="nd">@classmethod</span>
<div class="viewcode-block" id="OptionsParser.get"><a class="viewcode-back" href="../../../_generated/pyamp_config_parser.html#pyamp.config.parser.OptionsParser.get">[docs]</a>    <span class="k">def</span> <span class="nf">get</span><span class="p">(</span><span class="n">cls</span><span class="p">,</span> <span class="n">section</span><span class="p">,</span> <span class="n">optionName</span><span class="p">,</span> <span class="n">defaultValue</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
        <span class="sd">&#39;&#39;&#39;Get the value of an option from the given section.</span>

<span class="sd">        * section -- The name of the section</span>
<span class="sd">        * optionName -- The name of the option</span>
<span class="sd">        * defaultValue -- The default value if the option does not exist</span>

<span class="sd">        &#39;&#39;&#39;</span>
        <span class="n">sectionOptions</span> <span class="o">=</span> <span class="n">cls</span><span class="p">()</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">section</span><span class="p">,</span> <span class="p">{})</span>
        <span class="k">return</span> <span class="n">sectionOptions</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">optionName</span><span class="p">,</span> <span class="n">defaultValue</span><span class="p">)</span>
</div>
    <span class="nd">@classmethod</span>
<div class="viewcode-block" id="OptionsParser.getCl"><a class="viewcode-back" href="../../../_generated/pyamp_config_parser.html#pyamp.config.parser.OptionsParser.getCl">[docs]</a>    <span class="k">def</span> <span class="nf">getCl</span><span class="p">(</span><span class="n">cls</span><span class="p">,</span> <span class="n">optionName</span><span class="p">,</span> <span class="n">defaultValue</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
        <span class="sd">&#39;&#39;&#39;Get the value of a command line option.</span>

<span class="sd">        * optionName -- The name of the command line option</span>
<span class="sd">        * defaultValue -- The default value if the option does not exist</span>

<span class="sd">        &#39;&#39;&#39;</span>
        <span class="k">return</span> <span class="n">cls</span><span class="p">()</span><span class="o">.</span><span class="n">clOptions</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">optionName</span><span class="p">,</span> <span class="n">defaultValue</span><span class="p">)</span>
</div>
    <span class="k">def</span> <span class="nf">__parseCommandLine</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">argv</span><span class="p">):</span>
        <span class="sd">&#39;&#39;&#39;Parse the command line options.</span>

<span class="sd">        * argv -- The command line options</span>

<span class="sd">        &#39;&#39;&#39;</span>
        <span class="c"># Parse the given command line options</span>
        <span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">_</span><span class="p">)</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_commandLineParser</span><span class="o">.</span><span class="n">parse_args</span><span class="p">(</span><span class="n">argv</span><span class="p">)</span>

        <span class="c"># Join the command line options with our current options and</span>
        <span class="c"># allow the command line options to override any currently</span>
        <span class="c"># set option values</span>
        <span class="k">for</span> <span class="n">section</span><span class="p">,</span> <span class="n">optionDict</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_commandLineOptions</span><span class="o">.</span><span class="n">iteritems</span><span class="p">():</span>
            <span class="k">for</span> <span class="n">optionName</span><span class="p">,</span> <span class="n">_</span> <span class="ow">in</span> <span class="n">optionDict</span><span class="o">.</span><span class="n">iteritems</span><span class="p">():</span>
                <span class="n">value</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">optionName</span><span class="p">)</span>

                <span class="k">if</span> <span class="n">value</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span>
                    <span class="k">if</span> <span class="n">section</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="p">:</span>
                        <span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="p">[</span><span class="n">section</span><span class="p">]</span> <span class="o">=</span> <span class="p">{}</span>
                    <span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="p">[</span><span class="n">section</span><span class="p">][</span><span class="n">optionName</span><span class="p">]</span> <span class="o">=</span> <span class="n">value</span>

        <span class="c"># Store all of the command line option values</span>
        <span class="k">for</span> <span class="n">clOption</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">ClOptions</span><span class="p">:</span>
            <span class="n">optionName</span> <span class="o">=</span> <span class="n">clOption</span><span class="o">.</span><span class="n">getName</span><span class="p">()</span>
            <span class="k">if</span> <span class="nb">hasattr</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">optionName</span><span class="p">):</span>
                <span class="n">value</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">optionName</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">clOptions</span><span class="p">[</span><span class="n">optionName</span><span class="p">]</span> <span class="o">=</span> <span class="n">value</span>

    <span class="k">def</span> <span class="nf">__parseFile</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">filename</span><span class="p">):</span>
        <span class="sd">&#39;&#39;&#39;Parse the configuration file.</span>

<span class="sd">        * filename -- The configuration file</span>

<span class="sd">        &#39;&#39;&#39;</span>
        <span class="k">if</span> <span class="n">exists</span><span class="p">(</span><span class="n">filename</span><span class="p">):</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_configParser</span><span class="o">.</span><span class="n">parse</span><span class="p">(</span><span class="n">filename</span><span class="p">)</span>
            <span class="n">settings</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_configParser</span><span class="o">.</span><span class="n">getSettings</span><span class="p">()</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">items</span><span class="p">()</span> <span class="o">+</span> <span class="n">settings</span><span class="o">.</span><span class="n">items</span><span class="p">())</span>

    <span class="k">def</span> <span class="nf">__createCommandLineParser</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&#39;&#39;&#39;Create the command line parser object.&#39;&#39;&#39;</span>
        <span class="c"># Keep a list of all of the command line option variable names</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_commandLineOptions</span> <span class="o">=</span> <span class="p">{}</span>

        <span class="c"># Parser for the command line options</span>
        <span class="n">parser</span> <span class="o">=</span> <span class="n">OptionParser</span><span class="p">()</span>

        <span class="c"># Traverse all of the configured sections</span>
        <span class="k">for</span> <span class="n">section</span><span class="p">,</span> <span class="n">options</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">Options</span><span class="o">.</span><span class="n">iteritems</span><span class="p">():</span>
            <span class="c"># Travese only the options in this section that are configurable</span>
            <span class="c"># via the command line</span>
            <span class="k">for</span> <span class="n">option</span> <span class="ow">in</span> <span class="p">[</span><span class="n">opt</span> <span class="k">for</span> <span class="n">opt</span> <span class="ow">in</span> <span class="n">options</span> <span class="k">if</span> <span class="n">opt</span><span class="o">.</span><span class="n">isCommandLine</span><span class="p">()]:</span>
                <span class="n">optionName</span> <span class="o">=</span> <span class="n">option</span><span class="o">.</span><span class="n">getName</span><span class="p">()</span>
                <span class="n">defaultValue</span> <span class="o">=</span> <span class="n">option</span><span class="o">.</span><span class="n">getDefaultValue</span><span class="p">()</span>

                <span class="c"># @todo: create other Option objects that can use more values</span>
                <span class="c">#        from this class...help, have no value, etc</span>
                <span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&quot;--</span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="n">optionName</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="n">optionName</span><span class="p">,</span>
                                  <span class="n">default</span><span class="o">=</span><span class="n">defaultValue</span><span class="p">)</span>

                <span class="k">if</span> <span class="n">section</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_commandLineOptions</span><span class="p">:</span>
                    <span class="bp">self</span><span class="o">.</span><span class="n">_commandLineOptions</span><span class="p">[</span><span class="n">section</span><span class="p">]</span> <span class="o">=</span> <span class="p">{}</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_commandLineOptions</span><span class="p">[</span><span class="n">section</span><span class="p">][</span><span class="n">optionName</span><span class="p">]</span> <span class="o">=</span> <span class="n">defaultValue</span>

        <span class="c"># Add all of the command line only options</span>
        <span class="k">for</span> <span class="n">clOption</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">ClOptions</span><span class="p">:</span>
            <span class="n">clOption</span><span class="o">.</span><span class="n">addOption</span><span class="p">(</span><span class="n">parser</span><span class="p">)</span>

        <span class="c"># Store the command line parser locally</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_commandLineParser</span> <span class="o">=</span> <span class="n">parser</span>

    <span class="k">def</span> <span class="nf">__createConfigParser</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&#39;&#39;&#39;Create the configuration file parser object.&#39;&#39;&#39;</span>
        <span class="c"># Create the dictionary mapping sections to their respective Options</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_configOptions</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">Options</span>

        <span class="c"># Define all of the configuration variables that can be used</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_configVariables</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">Variables</span>

        <span class="c"># Create the configuration parser using the configured variables and</span>
        <span class="c"># configuration options</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_configParser</span> <span class="o">=</span> <span class="n">ConfigFile</span><span class="p">(</span><span class="n">logger</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_logger</span><span class="p">,</span>
                                        <span class="n">options</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_configOptions</span><span class="p">,</span>
                                        <span class="n">variables</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_configVariables</span><span class="p">)</span></div>
</pre></div>

          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../../../search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li><a href="../../../index.html">pyamp v1.2 documentation</a> &raquo;</li>
          <li><a href="../../index.html" >Module code</a> &raquo;</li>
          <li><a href="../config.html" >pyamp.config</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2012, Brett Ponsler.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1.
    </div>
  </body>
</html>